package com.githan.ksback_v2_3.Controller;

import com.alibaba.fastjson.JSON;
import com.githan.ksback_v2_3.Services.QuackResultsMaDaoTouService;
import com.githan.ksback_v2_3.Services.QuackStationMaDaoTouService;
import com.githan.ksback_v2_3.Entity.MineQuakeResultsMaDaoTou;
import com.githan.ksback_v2_3.Entity.MineQuakeStationMaDaoTou;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author https://github.com/Han56
 * @date 2021/3/27 8:48
 * 描述：马道头控制层
 */
@RestController
public class MaDaoTouResultsController {

    @Autowired
    QuackResultsMaDaoTouService quackResultsMaDaoTouService;
    @Autowired
    QuackStationMaDaoTouService quackStationMaDaoTouService;

    @GetMapping("/mdt_test")
    public String mdt_test(){
        List<MineQuakeResultsMaDaoTou> testList=quackResultsMaDaoTouService.getAllMaDaoTouResults();
        String return_json=JSON.toJSONString(testList);
        return return_json;
    }

    @GetMapping("/mdt_station")
    public String mdt_station(){
        List<MineQuakeStationMaDaoTou> testList=quackStationMaDaoTouService.getAllMaDaoTouStation();
        String return_json=JSON.toJSONString(testList);
        return return_json;
    }

}
